Structural recursion with locally scoped names
نویسنده
چکیده
This paper introduces a new recursion principle for inductively defined data modulo α-equivalence of bound names that makes use of Odersky-style local names when recursing over bound names. It is formulated in simply typed λ-calculus extended with names that can be restricted to a lexical scope, tested for equality, explicitly swapped and abstracted. The new recursion principle is motivated by the nominal sets notion of “α-structural recursion”, whose use of names and associated freshness side-conditions in recursive definitions formalizes common practice with binders. The new calculus has a simple interpretation in nominal sets equipped with name restriction operations. It is shown to adequately represent α-structural recursion while avoiding the need to verify freshness side-conditions in definitions and computations. The paper is a revised and expanded version of (Pitts, 2010).
منابع مشابه
Relating Two Semantics of Locally Scoped Names
The operational semantics of programming constructs involving locally scoped names typically makes use of stateful dynamic allocation: a set of currently-used names forms part of the state and upon entering a scope the set is augmented by a new name bound to the scoped identifier. More abstractly, one can see this as a transformation of local scopes by expanding them outward to an implicit top-...
متن کاملNominal Logic: A First Order Theory of Names and Binding
This paper formalises within first-order logic some common practices in computer science to do with representing and reasoning about syntactical structures involving lexically scoped binding constructs. It introduces Nominal Logic, a version of first-order many-sorted logic with equality containing primitives for renaming via name-swapping, for freshness of names, and for name-binding. Its axio...
متن کاملTypes for Lexically-Scoped Access Control
We develop a new system for defining and enforcing access control statically. In our system, key-pairsguard access to resources, and the association between key-pairs and resources can be changed at anyprogram point (i.e., the binding is late). Our static system uses an ordering on lexically scoped abstractnames to allow local access control policies to be enforced in other parts of...
متن کاملQuerying Proofs
We motivate and introduce a query language PrQL designed for inspecting machine representations of proofs. PrQL natively supports hiproofs which express proof structure using hierarchical nested labelled trees. The core language presented in this paper is locally structured, with queries built using recursion and patterns over proof structure and rule names. We define the syntax and semantics o...
متن کاملFirst-Class Extents
Adding environments as rst-class values to a language can greatly enhance its expressiveness. But rst-class environments do not mesh well into a lexically scoped language since they rely on identi ers (variable names). By distinguishing variables from identi ers and therefore extents from environments, we present an alternative: rst-class extents. First-class extents are de ned on variables rat...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Funct. Program.
دوره 21 شماره
صفحات -
تاریخ انتشار 2011